\hypertarget{xscale_8h_source}{}\doxysection{xscale.\+h}
\mbox{\hyperlink{xscale_8h}{浏览该文件的文档.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef XScale\_H}}
\DoxyCodeLine{2 \textcolor{preprocessor}{\#define XScale\_H}}
\DoxyCodeLine{3 }
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <QLabel>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <QPainter>}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <QPaintEvent>}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <QMouseEvent>}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <QApplication>}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <QDebug>}}
\DoxyCodeLine{10 }
\DoxyCodeLine{11 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{xnamespace_8h}{xnamespace.h}}"{}}}
\DoxyCodeLine{12 }
\DoxyCodeLine{13 QT\_BEGIN\_NAMESPACE}
\DoxyCodeLine{14 }
\DoxyCodeLine{15 \textcolor{keyword}{class }\mbox{\hyperlink{class_x_scale_private}{XScalePrivate}};}
\DoxyCodeLine{16 \textcolor{keyword}{class }\mbox{\hyperlink{class_x_scale}{XScale}} : \textcolor{keyword}{public} QLabel}
\DoxyCodeLine{17 \{}
\DoxyCodeLine{18     Q\_OBJECT}
\DoxyCodeLine{19 }
\DoxyCodeLine{20     Q\_PROPERTY(\textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_a9dc084b55bba2aa56be1669fde88c5cd}{mainScaleNumber}} READ \mbox{\hyperlink{class_x_scale_a4c7698a429895ca1a7ffd247fc1a4aa6}{getMainScaleNumber}} WRITE \mbox{\hyperlink{class_x_scale_a3d8b3c2c359576961442c0311ba6a7e1}{setMainScaleNumber}})}
\DoxyCodeLine{21     Q\_PROPERTY(\textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_a3cb46aa617851ec72e7038aee55928b2}{subScaleNumber}} READ \mbox{\hyperlink{class_x_scale_af008f2b963d796102ec54bbd61bb8598}{getSubScaleNumber}} WRITE \mbox{\hyperlink{class_x_scale_a2e5e3517d617377d8a47e8e6bd533d66}{setSubScaleNumber}})}
\DoxyCodeLine{22 }
\DoxyCodeLine{23     Q\_PROPERTY(\textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_a9e5b030b32f63f36e06c1673c23ed55b}{maximumRange}} READ \mbox{\hyperlink{class_x_scale_a523a19c300e8e2165f9349e6a34029f9}{getMaximumRange}} WRITE \mbox{\hyperlink{class_x_scale_a80039673425b2a59877cc309fccd74c4}{setMaximumRange}})}
\DoxyCodeLine{24     Q\_PROPERTY(\textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_aef2ba19e56856577601086092e16c764}{minimumRange}} READ \mbox{\hyperlink{class_x_scale_a46b6501870d895ffc1bb6a40c2b2e655}{getMinimumRange}} WRITE \mbox{\hyperlink{class_x_scale_a7757ffa59639ade89192cbf0f6ef0884}{setMinimumRange}})}
\DoxyCodeLine{25 }
\DoxyCodeLine{26     Q\_PROPERTY(\textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_a5d562cc040ce8526e55c9937708152f8}{precision}} READ \mbox{\hyperlink{class_x_scale_a0ebd68719f42804d3bf9e04494242e7b}{getPrecision}} WRITE \mbox{\hyperlink{class_x_scale_a59188c51cf7b9b820338e9f38334934e}{setPrecision}})}
\DoxyCodeLine{27     Q\_PROPERTY(\textcolor{keywordtype}{bool} \mbox{\hyperlink{class_x_scale_a6a2e85e0d7c2e98b1015e2929e83b8d2}{unitStringEnable}} READ \mbox{\hyperlink{class_x_scale_a5ef8bda36c37bfdc6abe9b32a0617de2}{getUnitStringEnable}} WRITE \mbox{\hyperlink{class_x_scale_a8119454b6eff5d78277125669c7121ec}{setUnitStringEnable}})}
\DoxyCodeLine{28     Q\_PROPERTY(QString \mbox{\hyperlink{class_x_scale_ae7a63bfb55c6affc70ae4c692b7ebef0}{unitString}} READ \mbox{\hyperlink{class_x_scale_a24770b2c749eb1c132fa9274b46362b9}{getUnitString}} WRITE \mbox{\hyperlink{class_x_scale_a570a7a5a14ac511614c27bf666f52e05}{setUnitString}})}
\DoxyCodeLine{29     Q\_PROPERTY(QColor \mbox{\hyperlink{class_x_scale_af133260f880d47c0c3d180147e8713e5}{unitStringColor}} READ \mbox{\hyperlink{class_x_scale_af44152e3b21952b7fd21aa9a460734b8}{getUnitStringColor}} WRITE \mbox{\hyperlink{class_x_scale_ac75788cce0936aede47aea8ca1df2b70}{setUnitStringColor}})}
\DoxyCodeLine{30 }
\DoxyCodeLine{31     Q\_PROPERTY(QColor \mbox{\hyperlink{class_x_scale_ab54d80292dac1b95d76cdd111d120b6d}{mainScaleColor}} READ \mbox{\hyperlink{class_x_scale_a0e5e96c59b5470e83861ab7c52cf6541}{getMainScaleColor}} WRITE \mbox{\hyperlink{class_x_scale_a2c684cd9af498289b54d13e2d9350bdb}{setMainScaleColor}})}
\DoxyCodeLine{32     Q\_PROPERTY(QColor \mbox{\hyperlink{class_x_scale_a524e7e71d25995f5b9f7e2cb385412ba}{baseScaleColor}} READ \mbox{\hyperlink{class_x_scale_ad764d1d853de945e4bcb9468b1dcd6a7}{getBaseScaleColor}} WRITE \mbox{\hyperlink{class_x_scale_a61e95a509063d7d6149c8b4a478c7a47}{setBaseScaleColor}})}
\DoxyCodeLine{33     Q\_PROPERTY(QColor \mbox{\hyperlink{class_x_scale_a674443cd23bd89640095b86d07ac3fed}{scaleValueColor}} READ \mbox{\hyperlink{class_x_scale_a0185557e90fddaf78265ea0071a22cee}{getScaleValueColor}} WRITE \mbox{\hyperlink{class_x_scale_a0a815468fccf55928db43d3bb4923fb4}{setScaleValueColor}})}
\DoxyCodeLine{34 }
\DoxyCodeLine{35     Q\_PROPERTY(\mbox{\hyperlink{class_x_type_a1615daca60c656f9bb7e6ab04ecef289}{XType::ScaleChartDirection}} \mbox{\hyperlink{class_x_scale_aded767b2310cc36f5bb49a40e1da9b7c}{scaleDirection}} READ \mbox{\hyperlink{class_x_scale_ae2012efd64802eb687758ad402e6d9f1}{getScaleDirection}} WRITE \mbox{\hyperlink{class_x_scale_ad16cbb7ba9b44f7add3cb254053cd50e}{setScaleDirection}})}
\DoxyCodeLine{36     Q\_PROPERTY(\textcolor{keywordtype}{bool} \mbox{\hyperlink{class_x_scale_ab9dbe1f2d0673bd63f20c17cfd85840d}{scaleValueReverseOrder}} READ \mbox{\hyperlink{class_x_scale_a09e0bfc569f3006588fed5965927cff3}{getScaleValueReverseOrder}} WRITE \mbox{\hyperlink{class_x_scale_a944d770c8eee6277187f64f5e1bb5787}{setScaleValueReverseOrder}})}
\DoxyCodeLine{37 }
\DoxyCodeLine{38     Q\_PROPERTY(QColor \mbox{\hyperlink{class_x_scale_a6a03b40d85e4789e575a978e70a88f7b}{borderColor}} READ \mbox{\hyperlink{class_x_scale_a2d49abac0a78232ec135c3c74e37e6d9}{getBorderColor}} WRITE \mbox{\hyperlink{class_x_scale_a6bfb7c1df5b9528b008448d4179a8451}{setBorderColor}})}
\DoxyCodeLine{39     Q\_PROPERTY(QColor \mbox{\hyperlink{class_x_scale_a98cff14251538bd108cfe35720e672ce}{backgroundColor}} READ \mbox{\hyperlink{class_x_scale_a2d26295d650b8b33734cfab5fb12d7af}{getBackgroundColor}} WRITE \mbox{\hyperlink{class_x_scale_a334e578aa18b6d8554c2b6d93179167a}{setBackgroundColor}})}
\DoxyCodeLine{40 }
\DoxyCodeLine{41 \textcolor{keyword}{public}:}
\DoxyCodeLine{42     \textcolor{keyword}{explicit} \mbox{\hyperlink{class_x_scale_a051f52296a2c1c951d943a24ee340d8d}{XScale}}(QWidget *parent = \textcolor{keyword}{nullptr}, Qt::WindowFlags f=Qt::WindowFlags());}
\DoxyCodeLine{43     \mbox{\hyperlink{class_x_scale_a966f1a30694660049637008a155f410c}{\string~XScale}}();}
\DoxyCodeLine{44 }
\DoxyCodeLine{45     \textcolor{comment}{/* Property Interface */}}
\DoxyCodeLine{46     \textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_a4c7698a429895ca1a7ffd247fc1a4aa6}{getMainScaleNumber}}() \textcolor{keyword}{const};}
\DoxyCodeLine{47     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a3d8b3c2c359576961442c0311ba6a7e1}{setMainScaleNumber}}(\textcolor{keywordtype}{int});}
\DoxyCodeLine{48 }
\DoxyCodeLine{49     \textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_af008f2b963d796102ec54bbd61bb8598}{getSubScaleNumber}}() \textcolor{keyword}{const};}
\DoxyCodeLine{50     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a2e5e3517d617377d8a47e8e6bd533d66}{setSubScaleNumber}}(\textcolor{keywordtype}{int});}
\DoxyCodeLine{51 }
\DoxyCodeLine{52     \textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_a523a19c300e8e2165f9349e6a34029f9}{getMaximumRange}}() \textcolor{keyword}{const};}
\DoxyCodeLine{53     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a80039673425b2a59877cc309fccd74c4}{setMaximumRange}}(\textcolor{keywordtype}{int});}
\DoxyCodeLine{54 }
\DoxyCodeLine{55     \textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_a46b6501870d895ffc1bb6a40c2b2e655}{getMinimumRange}}() \textcolor{keyword}{const};}
\DoxyCodeLine{56     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a7757ffa59639ade89192cbf0f6ef0884}{setMinimumRange}}(\textcolor{keywordtype}{int});}
\DoxyCodeLine{57 }
\DoxyCodeLine{58     \textcolor{keywordtype}{int} \mbox{\hyperlink{class_x_scale_a0ebd68719f42804d3bf9e04494242e7b}{getPrecision}}() \textcolor{keyword}{const};}
\DoxyCodeLine{59     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a59188c51cf7b9b820338e9f38334934e}{setPrecision}}(\textcolor{keywordtype}{int});}
\DoxyCodeLine{60 }
\DoxyCodeLine{61     \textcolor{keywordtype}{bool} \mbox{\hyperlink{class_x_scale_a5ef8bda36c37bfdc6abe9b32a0617de2}{getUnitStringEnable}}() \textcolor{keyword}{const};}
\DoxyCodeLine{62     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a8119454b6eff5d78277125669c7121ec}{setUnitStringEnable}}(\textcolor{keywordtype}{bool});}
\DoxyCodeLine{63 }
\DoxyCodeLine{64     QString \mbox{\hyperlink{class_x_scale_a24770b2c749eb1c132fa9274b46362b9}{getUnitString}}() \textcolor{keyword}{const};}
\DoxyCodeLine{65     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a570a7a5a14ac511614c27bf666f52e05}{setUnitString}}(\textcolor{keyword}{const} QString \textcolor{keywordtype}{string});}
\DoxyCodeLine{66 }
\DoxyCodeLine{67     QColor \mbox{\hyperlink{class_x_scale_a0e5e96c59b5470e83861ab7c52cf6541}{getMainScaleColor}}() \textcolor{keyword}{const};}
\DoxyCodeLine{68     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a2c684cd9af498289b54d13e2d9350bdb}{setMainScaleColor}}(\textcolor{keyword}{const} QColor \&color);}
\DoxyCodeLine{69 }
\DoxyCodeLine{70     QColor \mbox{\hyperlink{class_x_scale_af44152e3b21952b7fd21aa9a460734b8}{getUnitStringColor}}() \textcolor{keyword}{const};}
\DoxyCodeLine{71     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_ac75788cce0936aede47aea8ca1df2b70}{setUnitStringColor}}(\textcolor{keyword}{const} QColor \&color);}
\DoxyCodeLine{72 }
\DoxyCodeLine{73     QColor \mbox{\hyperlink{class_x_scale_ad764d1d853de945e4bcb9468b1dcd6a7}{getBaseScaleColor}}() \textcolor{keyword}{const};}
\DoxyCodeLine{74     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a61e95a509063d7d6149c8b4a478c7a47}{setBaseScaleColor}}(\textcolor{keyword}{const} QColor \&color);}
\DoxyCodeLine{75 }
\DoxyCodeLine{76     QColor \mbox{\hyperlink{class_x_scale_a0185557e90fddaf78265ea0071a22cee}{getScaleValueColor}}() \textcolor{keyword}{const};}
\DoxyCodeLine{77     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a0a815468fccf55928db43d3bb4923fb4}{setScaleValueColor}}(\textcolor{keyword}{const} QColor \&color);}
\DoxyCodeLine{78 }
\DoxyCodeLine{79     \mbox{\hyperlink{class_x_type_a1615daca60c656f9bb7e6ab04ecef289}{XType::ScaleChartDirection}} \mbox{\hyperlink{class_x_scale_ae2012efd64802eb687758ad402e6d9f1}{getScaleDirection}}() \textcolor{keyword}{const};}
\DoxyCodeLine{80     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_ad16cbb7ba9b44f7add3cb254053cd50e}{setScaleDirection}}(\textcolor{keyword}{const} \mbox{\hyperlink{class_x_type_a1615daca60c656f9bb7e6ab04ecef289}{XType::ScaleChartDirection}} type);}
\DoxyCodeLine{81 }
\DoxyCodeLine{82     \textcolor{keywordtype}{bool} \mbox{\hyperlink{class_x_scale_a09e0bfc569f3006588fed5965927cff3}{getScaleValueReverseOrder}}() \textcolor{keyword}{const};}
\DoxyCodeLine{83     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a944d770c8eee6277187f64f5e1bb5787}{setScaleValueReverseOrder}}(\textcolor{keywordtype}{bool} order);}
\DoxyCodeLine{84 }
\DoxyCodeLine{85     QColor \mbox{\hyperlink{class_x_scale_a2d49abac0a78232ec135c3c74e37e6d9}{getBorderColor}}() \textcolor{keyword}{const};}
\DoxyCodeLine{86     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a6bfb7c1df5b9528b008448d4179a8451}{setBorderColor}}(\textcolor{keyword}{const} QColor \&color);}
\DoxyCodeLine{87 }
\DoxyCodeLine{88     QColor \mbox{\hyperlink{class_x_scale_a2d26295d650b8b33734cfab5fb12d7af}{getBackgroundColor}}() \textcolor{keyword}{const};}
\DoxyCodeLine{89     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a334e578aa18b6d8554c2b6d93179167a}{setBackgroundColor}}(\textcolor{keyword}{const} QColor \&color);}
\DoxyCodeLine{90 }
\DoxyCodeLine{91 \textcolor{keyword}{protected}:}
\DoxyCodeLine{92     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a8473c02769bf96f2081dd79a3b2cba7f}{paintEvent}}(QPaintEvent *ev) \textcolor{keyword}{override};}
\DoxyCodeLine{93     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a5a36b7cac51cccd7117ecbddcb92a931}{drawBorder}}(QPainter *painter);}
\DoxyCodeLine{94     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a1ea102dbb8ab6f74d9deeb7cb458a2b3}{drawBg}}(QPainter *painter);}
\DoxyCodeLine{95     \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_af00a407dec9e9fcd0167c3505a25c563}{drawRuler}}(QPainter *painter);}
\DoxyCodeLine{96 }
\DoxyCodeLine{97     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_ac1dc2c70997031127ad560f2b32afd4e}{enterEvent}}(QEvent *ev) \textcolor{keyword}{override};}
\DoxyCodeLine{98     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a413b35cfe23c1be5c5f5edee67a02b5a}{leaveEvent}}(QEvent *ev) \textcolor{keyword}{override};}
\DoxyCodeLine{99     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a08330fb0ef89ba603fd038f218c40b06}{mousePressEvent}}(QMouseEvent *ev) \textcolor{keyword}{override};}
\DoxyCodeLine{100     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a9771aa27ccff952474d29010481137a8}{mouseReleaseEvent}}(QMouseEvent *ev) \textcolor{keyword}{override};}
\DoxyCodeLine{101     \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a915693e7f40de96344ea19d846914ed1}{mouseMoveEvent}}(QMouseEvent *ev) \textcolor{keyword}{override};}
\DoxyCodeLine{102 }
\DoxyCodeLine{103 \textcolor{keyword}{private}:}
\DoxyCodeLine{104     Q\_DISABLE\_COPY(\mbox{\hyperlink{class_x_scale}{XScale}})}
\DoxyCodeLine{105     \mbox{\hyperlink{class_x_scale_private}{XScalePrivate}} *\mbox{\hyperlink{class_x_scale_ab09814f09f715870bb6f89513adf3889}{xScaleP}};}
\DoxyCodeLine{106 }
\DoxyCodeLine{107     friend class \mbox{\hyperlink{class_x_scale_chart}{XScaleChart}};}
\DoxyCodeLine{108 }
\DoxyCodeLine{109     virtual \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a64564735a60ba3dc09bfe765954929ed}{getUnitStringParameters}}(QPainter *painter);}
\DoxyCodeLine{110     virtual \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a9282cefb0e74cf6a4b0de0af1e354e9e}{getScaleValueParameters}}(QPainter *painter);}
\DoxyCodeLine{111     virtual \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a7bde2c01af5b63b737e86ca1dd1a7a02}{getBaseLineParameters}}();}
\DoxyCodeLine{112     virtual \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_aa4b70392979f01e4292fa55050b53782}{getScaleLineLength}}();}
\DoxyCodeLine{113     virtual \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a0a644dd7b563ec46362a2925fc16f5b0}{getScaleLinePoint}}(QPainter *painter, QPointF \&startPoint, QPointF \&endPoint, const \textcolor{keywordtype}{int} index);}
\DoxyCodeLine{114     virtual \textcolor{keywordtype}{void} \mbox{\hyperlink{class_x_scale_a6dcd154c1c5927b57085ffc627aff598}{getScaleValueTextPoint}}(QPainter *painter, QString \&text, QPointF \&textPoint, const QPointF \&endPoint, const \textcolor{keywordtype}{int} index);}
\DoxyCodeLine{115 \};}
\DoxyCodeLine{116 }
\DoxyCodeLine{117 QT\_END\_NAMESPACE}
\DoxyCodeLine{118 }
\DoxyCodeLine{119 \textcolor{preprocessor}{\#endif }\textcolor{comment}{// XScale\_H}}

\end{DoxyCode}
